import defaultOption from '@/const/crud/defaultOption'


export function initListTableOption() {
    const listTableOption = {
        index: true,
        delBtn: true,
        menu: true,
        column: [
            {
                label: "Cron任务实例名称",
                width: 200,
                prop: "1",
                slot: true,
                headerslot: true,
            },
            {
                label: "描述",
                prop: "2",
                headerslot: true,
            },
            {
                label: "调度",
                prop: "3",
                headerslot: true,
            },
            {
                label: "作为用户运行",
                width: 150,
                prop: "45",
                slot: true,
                headerslot: true,
            },
            {
                label: "活动",
                prop: "32",
                headerslot: true,
            },
            {
                label: "保存历史记录",
                width: 150,
                prop: "41",
                slot: true,
                headerslot: true,
            },
        ]
    }
    return defaultOption(listTableOption, 'defaultListTableOption')
}
export function initlistParamOpiton() {
    const listTableOption = {
        index: true,
        delBtn: true,
        menu: true,
        column: [
            {
                label: "参数",
                width: 200,
                prop: "1",
                slot: true,
                headerslot: true,
            },
            {
                label: "值",
                prop: "2",
                headerslot: true,
            },
            {
                label: "描述",
                prop: "3",
                headerslot: true,
            },
        ]
    }
    return defaultOption(listTableOption, 'defaultListTableOption')
}

export function initFormOption() {
    const formOption = {
        labelWidth: 180,
        submitBtn: false,   // 提交按钮
        column: [
            {
                label: "Cron任务",
                width: 200,
                prop: "1",
                slot: true,
                headerslot: true,
            },
            {
                label: "类",
                prop: "2",
                headerslot: true,
            },
            {
                label: "访问级别",
                prop: "3",
                headerslot: true,
            },
            {
                label: "映射参数名",
                width: 150,
                prop: "4",
                slot: true,
                headerslot: true,
            },

        ]
    }
    return defaultOption(formOption, 'defaultListFormOption')
}


export function initListoption(companyId) {
    const listTableOption = {
        editBtn: true, // 表格修改按钮
        delBtn: true,  // 表格删除按钮
        menuWidth: 200, // 操作栏宽度
        defaultSort: {
            prop: 'id',
            order: 'descending'
        },
        column: [
            {
                label: '流水号',
                prop: 'id',
                sortable: true,
                headerslot: true,
            },
            {
                label: '测试12',
                prop: 'd',
                headerslot: true,
            },
            {
                label: '测试1223',
                prop: 'b',
                headerslot: true,
            },
            {
                label: '测试9',
                prop: 'c',
                headerslot: true,
            },
            {
                label: '测试122',
                prop: 'e',
                headerslot: true,
            },
        ]
    }
    return defaultOption(listTableOption, 'defaultListTableOption')
}
export function initlistFormOption(companyId) {

    //车辆查询的查询条件配置
    const listFormOption = {
        labelWidth: 140,
        column: [
            {
                label: "测试121",
                prop: "model_id",
                headerslot: true,
            },
            {
                label: "测试126",
                prop: "model_desc",
                headerslot: true,
            },
            {
                label: "测试1212",
                prop: "model_status",
            },
            {
                label: "测试127",
                prop: "create_date",
                headerslot: true,
            },
        ]
    }
    return defaultOption(listFormOption, 'defaultListFormOption')
}




